package com.cx330;

public class Example46 {
    public static void main(String[] args) {
        System.out.println(Math.round(1.5)); // 2
        System.out.println(Math.round(-1.5)); // -1
        // round(x)等价于(int)(x + 0.5)
    }
}
